package com.csf.create.abs;

/**
 * TODO ADD DESCRIPTION
 * Date: 2018/9/6
 * Time: 12:08
 *
 * @author chenshf
 */
public class SenderFactory extends AbstractFactory {

    @Override
    public Sender produceSender(String type) {
        if("sms".equals(type)){
            return new SmsSender();
        }else if ("mail".equals(type)){
            return new MailSender();
        }
        System.out.println("没有找到对应的类型："+type);
        return null;
    }

    @Override
    public Receiver produceReceive(String type) {
//        if("sms".equals(type)){
//            return new SmsReceiver();
//        }else if("mail".equals(type)){
//            return new MailReceiver();
//        }
//        System.out.println("没有找到对应的类型："+type);
        return null;
    }
}
